@model UpdaterManagement.Models.User

<nav aria-label="breadcrumb" class="breadcrumb-ace">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/">首页</a></li>
        <li class="breadcrumb-item"><a href="/User">用户管理</a></li>
        <li class="breadcrumb-item active">编辑用户</li>
    </ol>
</nav>

<div class="page-header">
    <div class="d-flex justify-content-between align-items-center">
        <div>
            <h1 class="page-title">
                <i class="bi bi-pencil text-primary me-2"></i>编辑用户
            </h1>
            <p class="page-subtitle">修改用户 <strong>@Model.Username</strong> 的信息</p>
        </div>
        <a href="/User" class="btn btn-outline-secondary">
            <i class="bi bi-arrow-left me-2"></i>返回列表
        </a>
    </div>
</div>

<div class="row">
    <div class="col-lg-8">
        <div class="card-ace">
            <div class="card-header">
                <i class="bi bi-form-check me-2"></i>用户信息
            </div>
            <div class="card-body">
                <partial name="_ErrorAlert" />
                
                <form method="post">
                    <input type="hidden" asp-for="Id" />
                    <input type="hidden" asp-for="CreatedTime" />
                    
                    <div class="row">
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label class="form-label-ace">
                                    <i class="bi bi-person text-primary me-1"></i>用户名
                                </label>
                                <input type="text" class="form-control form-control-ace" asp-for="Username" required />
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label class="form-label-ace">
                                    <i class="bi bi-person-badge text-primary me-1"></i>真实姓名
                                </label>
                                <input type="text" class="form-control form-control-ace" asp-for="RealName" required />
                            </div>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label class="form-label-ace">
                                    <i class="bi bi-lock text-primary me-1"></i>密码
                                </label>
                                <input type="password" class="form-control form-control-ace" asp-for="Password" 
                                       placeholder="留空则不修改密码" />
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label class="form-label-ace">
                                    <i class="bi bi-shield text-primary me-1"></i>用户角色
                                </label>
                                <select class="form-select form-control-ace" asp-for="Role" required>
                                    <option value="User">普通用户</option>
                                    <option value="Admin">管理员</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-3">
                        <label class="form-label-ace">
                            <i class="bi bi-envelope text-primary me-1"></i>邮箱地址
                        </label>
                        <input type="email" class="form-control form-control-ace" asp-for="Email" />
                    </div>
                    
                    <div class="mb-3">
                        <div class="form-check">
                            <input type="checkbox" class="form-check-input" asp-for="IsActive" />
                            <label class="form-check-label">
                                <i class="bi bi-toggle-on text-success me-1"></i>启用用户
                            </label>
                        </div>
                    </div>
                    
                    <div class="d-flex gap-2 pt-3 border-top">
                        <button type="submit" class="btn btn-ace-primary">
                            <i class="bi bi-check-circle me-2"></i>保存修改
                        </button>
                        <a href="/User" class="btn btn-outline-secondary">
                            <i class="bi bi-x-circle me-2"></i>取消
                        </a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>